Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Popovers to have close button #57

Merged
merged 4 commits into from
Jun 28, 2017

Conversation

KStClaire
Copy link
Collaborator

Just added the 'X' dismiss button to the upper right corner of popovers, kind of along the lines of issue #31

The close button appears both when a title is present and not, and changes the styling of the close button and popover accordingly.
This is needed as Design wished to have a close button as part of all popovers as an obvious way to get out of them, and is required as part of an OE SEP story.

This fix currently only works for popovers that do not contain form elements, as there are some complications with FocusTrap that will need to be addressed in a separate pull request.

Added a close button to the upper right corner.
The close button appears both when a title is present and not,
and changes the styling accordingly.
`;

const PopoverBodyContent = styled.div`
padding: 9px 14px;
`;

const DismissPopover = styled(DismissButton)`
background-color: ${props => (props.hasTitle ? colors.accent : 'none')};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like there are some discrepancies between the heights of the title and the close button that results in the title section background looking like this. I think the easiest fix would be to apply the background color to the PopoverHeader instead.

screen shot 2017-06-28 at 12 39 17 pm

Changed popover header to have the background color,
instead of the title and close button themselves
@jrios
Copy link
Contributor

jrios commented Jun 28, 2017

Can you execute npm run styleguide-build to generate new docs? Then commit those and we can merge this in.

@jrios
Copy link
Contributor

jrios commented Jun 28, 2017

Closes #31

@jrios jrios merged commit 70b1e50 into WTW-IM:master Jun 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants